home *** CD-ROM | disk | FTP | other *** search
- unit Bit2;
-
- interface
-
- {$R Bits.RES}
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, ExtCtrls;
-
- type
- TForm1 = class(TForm)
- Image1: TImage;
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.FormCreate(Sender: TObject);
- var
- MyBitmap:TBitmap;
- begin
- MyBitmap:=TBitmap.Create;
- MyBitmap.Handle := LoadBitmap(hInstance,'FIRST');
- { Set the image component to the size of the bitmap }
- Image1.Width:=MyBitmap.Width;
- Image1.Height:=MyBitmap.Height;
- { Show the image component copy of the bitmap }
- Image1.Canvas.Draw(0,0,MyBitmap);
- MyBitmap.Destroy;
- end;
-
- end.
-